package atom.core3.hibernate.spring.util;

import org.hibernate.SessionFactory;

import atom.core3.spring.util.SpringContext;

public class SessionFactoryManager
{
	
	public static SessionFactoryManager instance;


	public static SessionFactoryManager getInstance () {
		if (null == instance) instance = new SessionFactoryManager();
		return instance;
	}
	
	public SessionFactory getSessionFactory(String sessionFactoryName)
	{
		SessionFactory sessionFactory = (SessionFactory) SpringContext.getBean(sessionFactoryName);
		return sessionFactory;
	}
	
	
		

}
